<%@ page import="com.psl.model.file" %>
<%@ page import="com.psl.model.userlogin" %>
<%@ page import="com.psl.services.frame.fileUploadServices" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    userlogin userinfo = (userlogin) session.getAttribute("user");
    if (userinfo == null) {
        response.sendRedirect("/login.do");
    }%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="/assets/css/text.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/main.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/content.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="/assets/js/common.js"></script>
    <script language="javascript" src="/assets/js/general.js"></script>
    <script language="JavaScript" type="text/JavaScript">
    </script>
    <style>
        #title {
            width: 92%;
            border: 0px;
            margin-bottom: 10px;
        }

        #title td {
            text-align: center;
            height: 20px;
            line-height: 150%
        }

        #title div {
            background-image: url(/assets/img/dot_02.gif);
            background-position: left top;
            background-repeat: no-repeat;
            margin: 0 auto;
            padding-left: 20px;
            text-align: left;
            width: 10%;
            font-size: 15px;
            font-weight: bold;
            color: #CC0000;
            letter-spacing: 2px;
        }
    </style>
</head>
<body>

<table cellspacing="0" cellpadding="0" id="title" align="center">
    <tbody>
    <tr>
        <td nowrap="nowrap">
            <div>文件管理</div>
        </td>
    </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" class="subtitle">
    <tbody>
    <tr>
        <td class="subtitle">文件管理说明</td>
        <td>&nbsp;</td>
        <td id="rightbg">&nbsp;</td>
    </tr>
    </tbody>
</table>
<table cellpadding="0" cellspacing="0" class="explain_tab">
    <tbody>
    <tr>
        <td class="explain">
            <p align="left"></p>
        </td>
    </tr>
    </tbody>
</table>
<br>

<table width="99%" border="0" cellpadding="3" cellspacing="1" align="center" class="datalist">
    <tbody>
    <tr>
        <th align="center">序号</th>
        <th height="25" align="center">文件名称</th>
        <th height="25" align="center">上传时间</th>
        <th align="center">操作</th>
    </tr>
    <%
        int filetype = Integer.parseInt(request.getParameter("filetype"));
        fileUploadServices fus = new fileUploadServices();
        List f = fus.filelist(filetype);
        Iterator iter = f.iterator();
        int i = 0;
        file file = null;
        while (iter.hasNext()) {
            i = i + 1;
            file = (file) iter.next();%>
    <tr>
        <td align="center"><%=i%>
        </td>
        <td height="25" align="center"><a
                href="/servlet/DownloadServlet?fileName=<%=file.getFileName()%>&fileUUid=<%=file.getFileUUid()%>&filetype=<%=file.getFiletype()%>"><%=file.getFileName()%>
        </a></td>
        <td height="25" align="center"><%=file.getDate()%>
        </td>
        <td align="center"><a href="/delfile.do?fileUUid=<%=file.getFileUUid()%>">删除</a></td>
    </tr>
    <% }%>
    </tbody>
</table>
</body>
</html>


